package com.yl.module.common.controller;


import com.yl.module.common.entity.Student;
import com.yl.module.common.service.IStudentService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author Administrator
 * @since 2020-03-06
 */
@Slf4j
@Controller
@RequestMapping("student")
public class StudentController {

    @Autowired
    private IStudentService studentService;

    @GetMapping("one")
    @ResponseBody
    public Student index() {
        Student s = studentService.findOne(1);
        return s;
    }
}

